<!--suppress ALL -->
<div id="content-watermark"></div>
<div class="tab-pid_tuning toolbar_fixed_bottom">
    <div class="content_wrapper">
        <div class="tab_title subtab__header">
            <span class="subtab__header_label subtab__header_label--current" for="subtab-pid">PID gains</span>
            <span class="subtab__header_label" for="subtab-rates">Rates & Expo</span>
            <span class="subtab__header_label" for="subtab-filters">Filters</span>
            <span class="subtab__header_label" for="subtab-mechanics">Mechanics</span>
        </div>
        <div id="subtab-pid" class="subtab__content subtab__content--current">
            <div class="cf_column right" style="margin-top: -6px;">
                <div class="default_btn show">
                    <a href="#" id="showAllPids">Show all PIDs</a>
                </div>
                <div class="default_btn resetbt">
                    <a href="#" id="resetPIDs">Reset PID Controller</a>
                </div>
            </div>
            <div class="tab_subtitle" style="margin-top: 1em;">PID gains</div>
            <div class="clear-both"></div>
            <div class="cf_column pid-section">
                <div class="gui_box grey">
                    <table class="pid_titlebar">
                        <tr>
                            <th class="name" data-i18n="pidTuningName"></th>
                            <th class="proportional" data-i18n="pidTuningProportional"></th>
                            <th class="integral" data-i18n="pidTuningIntegral"></th>
                            <th class="derivative" data-i18n="pidTuningDerivative"></th>
                            <th class="feedforward" data-i18n="pidTuningFeedForward"></th>
                        </tr>
                    </table>
                    <table id="pid_main" class="pid_tuning">
                        <tr>
                            <th colspan="5">
                                <div class="pid_mode" data-i18n="pidTuningBasic"></div>
                            </th>
                        </tr>
                        <tr class="ROLL" data-pid-bank-position="0">
                            <!-- 0 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" class="rpy_d" name="d" step="1" min="0" max="255" /></td>
                            <td><input type="number" class="rpy_ff" name="ff" step="1" min="0" max="255" /></td>
                        </tr>
                        <tr class="PITCH" data-pid-bank-position="1">
                            <!-- 1 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" class="rpy_d" name="d" step="1" min="0" max="255" /></td>
                            <td><input type="number" class="rpy_ff" name="ff" step="1" min="0" max="255" /></td>
                        </tr>
                        <tr class="YAW" data-pid-bank-position="2">
                            <!-- 2 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" class="rpy_d" name="d" step="1" min="0" max="255" /></td>
                            <td><input type="number" class="rpy_ff" name="ff" step="1" min="0" max="255" /></td>
                        </tr>
                    </table>
                    <table id="pid_baro" class="pid_tuning">
                        <tr>
                            <th colspan="5">
                                <div class="pid_mode" data-i18n="pidTuningAltitude"></div>
                            </th>
                        </tr>
                        <tr class="ALT" data-pid-bank-position="3">
                            <!-- 3 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="d" step="1" min="0" max="255" /></td>
                            <td></td>
                        </tr>
                        <tr class="Vario" data-pid-bank-position="9">
                            <!-- 9 -->
                            <td>VEL</td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="d" step="1" min="0" max="255" /></td>
                            <td></td>
                        </tr>
                    </table>
                    <table id="pid_mag" class="pid_tuning">
                        <tr>
                            <th colspan="5">
                                <div class="pid_mode" data-i18n="pidTuningMag"></div>
                            </th>
                        </tr>
                        <tr class="MAG" data-pid-bank-position="8">
                            <!-- 8 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr class="HEADING" data-pid-bank-position="10">
                            <!-- 8 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="d" step="1" min="0" max="255" /></td>
                            <td></td>
                        </tr>
                    </table>
                    <table id="pid_gps" class="pid_tuning">
                        <tr>
                            <th colspan="5">
                                <div class="pid_mode" data-i18n="pidTuningGps"></div>
                            </th>
                        </tr>
                        <tr class="Pos" data-pid-bank-position="4">
                            <!-- 4 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr class="PosR" data-pid-bank-position="5">
                            <!-- 5 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="d" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="ff" step="1" min="0" max="255" /></td>
                        </tr>
                        <tr class="NavR" data-pid-bank-position="6">
                            <!-- 6 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="d" step="1" min="0" max="255" /></td>
                            <td></td>
                        </tr>
                    </table>
                </div>
                <div class="gui_box grey topspacer">
                    <table id="pid_accel" class="pid_tuning">
                        <tr>
                            <th colspan="4">
                                <div class="pid_mode borderleft">
                                    <div class="textleft">
                                        <div class="pidTuningLevel" data-i18n="pidTuningLevel"></div>
                                        <div class="helpicon cf_tip" data-i18n_title="pidTuningLevelHelp"></div>
                                    </div>
                                    <div class="pids" data-i18n="pidTuningLevelP"></div>
                                    <div class="pids" data-i18n="pidTuningLevelI"></div>
                                    <div class="pids" data-i18n="pidTuningLevelD"></div>
                                </div>
                            </th>
                        </tr>
                        <tr class="LEVEL" data-pid-bank-position="7">
                            <!-- 7 -->
                            <td></td>
                            <td><input type="number" name="p" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="i" step="1" min="0" max="255" /></td>
                            <td><input type="number" name="d" step="1" min="0" max="255" /></td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>

        <div id="subtab-rates" class="subtab__content">
            <div class="tab_subtitle" style="margin-top: 1em;">Rates & Expo</div>
            <div class="clear-both"></div>
            <div class="cf_column">
                <table class="settings-table settings-table--inav">
                    <tbody>
                        <tr>
                            <th class="roll" data-i18n="pidTuningRollRate"></th>
                            <td class="roll">
                                <input type="number" id="rate-roll" class="rate-tpa_input" step="10" min="40"
                                    max="1800" />
                                degrees per second
                            </td>
                        </tr>
                        <tr>
                            <th class="pitch" data-i18n="pidTuningPitchRate"></th>
                            <td class="pitch">
                                <input type="number" id="rate-pitch" class="rate-tpa_input" step="10" min="40"
                                    max="1800" /> degrees per second
                            </td>
                        </tr>
                        <tr>
                            <th class="yaw" data-i18n="pidTuningYawRate"></th>
                            <td class="yaw">
                                <input type="number" id="rate-yaw" class="rate-tpa_input" step="10" min="10"
                                    max="1800" />
                                degrees per second
                            </td>
                        </tr>
                        <tr>
                            <th>Roll & Pitch Expo</th>
                            <td>
                                <input data-setting="rc_expo" type="number" class="rate-tpa_input" />
                            </td>
                        </tr>
                        <tr>
                            <th>Yaw Expo</th>
                            <td>
                                <input data-setting="rc_yaw_expo" type="number" class="rate-tpa_input" />
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="pidTuningMaxRollAngle"></th>
                            <td>
                                <input data-setting="max_angle_inclination_rll" data-setting-multiplier="10"
                                    type="number" class="rate-tpa_input" /> degrees
                                <div class="helpicon cf_tip" data-i18n_title="pidTuningMaxRollAngleHelp"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="pidTuningMaxPitchAngle"></th>
                            <td>
                                <input data-setting="max_angle_inclination_pit" data-setting-multiplier="10"
                                    type="number" class="rate-tpa_input" /> degrees
                                <div class="helpicon cf_tip" data-i18n_title="pidTuningMaxPitchAngleHelp"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="magHoldYawRate"></th>
                            <td>
                                <input type="number" id="magHoldYawRate" class="rate-tpa_input" step="5" min="10"
                                    max="250" /> degrees per second
                                <div class="helpicon cf_tip" data-i18n_title="pidTuningMagHoldYawRateHelp"></div>
                            </td>
                        </tr>
                        <tr>
                            <th class="roll" data-i18n="pidTuningManualRollRate"></th>
                            <td class="roll">
                                <input type="number" id="rate-manual-roll" class="rate-tpa_input" step="1" min="0"
                                    max="100" /> %
                            </td>
                        </tr>
                        <tr>
                            <th class="pitch" data-i18n="pidTuningManualPitchRate"></th>
                            <td class="pitch">
                                <input type="number" id="rate-manual-pitch" class="rate-tpa_input" step="1" min="0"
                                    max="100" /> %
                            </td>
                        </tr>
                        <tr>
                            <th class="yaw" data-i18n="pidTuningManualYawRate"></th>
                            <td class="yaw">
                                <input type="number" id="rate-manual-yaw" class="rate-tpa_input" step="1" min="0"
                                    max="100" /> %
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <div id="subtab-filters" class="subtab__content">
            <div class="tab_subtitle" data-i18n="mainFilters" style="margin-top: 1em;"></div>
            <div class="clear-both"></div>
            <div class="cf_column">
                <table class="settings-table settings-table--filtering">
                    <tbody>
                        <tr>
                            <th data-i18n="gyro_main_lpf_hz"></th>
                            <td>
                                <input data-setting="gyro_main_lpf_hz" type="number" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" data-i18n_title="gyro_main_lpf_hz_help"></div>
                            </td>
                        </tr>
                        <tr class="hides-v2_5">
                            <th>Gyro Dynamic Notch Filter</th>
                            <td>
                                <div style="padding-left: 1em; line-height: 28px;">
                                <input type="checkbox" data-bit="5" class="feature toggle" name="DYNAMIC_FILTERS" title="DYNAMIC_FILTERS" id="feature-5">
                                </div>
                            </td>
                        </tr>
                        <tr class="hides-v2_5">
                            <th>Gyro Dynamic Notch Width</th>
                            <td>
                                <input data-setting="dyn_notch_width_percent" type="number" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" title="Sets the distance in percent between dynamic gyro notches. Set to 0 to use single dynamic gyro notch."></div>
                            </td>
                        </tr>
                        <tr class="hides-v2_5">
                            <th>Gyro Dynamic Notch Min Frequency</th>
                            <td>
                                <input data-setting="dyn_notch_min_hz" type="number" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" title="Minimum frequency for dynamic gyro notch filters. Value should depends on propeller size. 150Hz work fine with 5&quot; and smaller. For 7&quot; and above lower even below 100Hz."></div>
                            </td>
                        </tr>
                        <tr class="requires-v2_5">
                            <th>Matrix Gyro Filter</th>
                            <td>
                                <select data-setting="dynamic_gyro_notch_enabled" />
                                <div class="helpicon cf_tip" data-i18n_title="dynamic_gyro_notch_enabled_help"></div>
                            </td>
                        </tr>
                        <tr class="requires-v2_5">
                            <th>Matrix Filter Min Frequency</th>
                            <td>
                                <input data-setting="dynamic_gyro_notch_min_hz" type="number" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" title="Minimum frequency for the Matrix Filter. Value should depends on propeller size. 150Hz work fine with 5&quot; and smaller. For 7&quot; and above lower even below 100Hz."></div>
                            </td>
                        </tr>
                        <tr class="requires-v2_5">
                            <th>Matrix Filter Q Factor</th>
                            <td>
                                <input data-setting="dynamic_gyro_notch_q" type="number" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" title="The higher value, the higher selectivity of the Matrix Filter. Values between 150 and 300 are recommended"></div>
                            </td>
                        </tr>
                        <tr class="requires-v2_5">
                            <th>Unicorn Filter</th>
                            <td>
                                <select data-setting="setpoint_kalman_enabled" />
                            </td>
                        </tr>
                        <tr class="requires-v2_6">
                            <th>Unicorn Filter Q Factor</th>
                            <td>
                                <input data-setting="setpoint_kalman_q" type="number" class="rate-tpa_input" />
                            </td>
                        </tr>
                        <tr class="requires-v2_6">
                            <th>Unicorn Filter Window Size</th>
                            <td>
                                <input data-setting="setpoint_kalman_w" type="number" class="rate-tpa_input" />
                            </td>
                        </tr>
                        
                    </tbody>
                </table>
            </div>

            <div class="clear-both"></div>
            <div class="tab_subtitle" data-i18n="dtermFilters" style="margin-top: 1em;"></div>
            <div class="cf_column">
                <table class="settings-table settings-table--filtering">
                    <tbody>
                        <tr>
                            <th data-i18n="dtermLpfCutoffFrequency"></th>
                            <td>
                                <input data-setting="dterm_lpf_hz" type="number" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" data-i18n_title="dtermLpfCutoffFrequencyHelp"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="dterm_lpf2_hz"></th>
                            <td>
                                <input data-setting="dterm_lpf2_hz" type="number" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" data-i18n_title="dterm_lpf2_hz_help"></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="clear-both requires-v2_4"></div>
            <div class="tab_subtitle requires-v2_4" data-i18n="rpmFilters" style="margin-top: 1em;"></div>
            <div class="cf_column requires-v2_4">
                <table class="settings-table settings-table--filtering">
                    <tbody>
                        <tr>
                            <th data-i18n="rpm_gyro_filter_enabled"></th>
                            <td>
                                <select data-setting="rpm_gyro_filter_enabled" />
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="rpm_gyro_min_hz"></th>
                            <td>
                                <input data-setting="rpm_gyro_min_hz" type="number" class="rate-tpa_input" />
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="clear-both"></div>
            <div class="tab_subtitle" data-i18n="tabFilteringAdvanced" style="margin-top: 1em;"></div>
            <div class="cf_column">
                <table class="settings-table settings-table--filtering">
                    <tbody>
                        <tr>
                            <th data-i18n="accLpfCutoffFrequency"></th>
                            <td>
                                <input type="number" id="accSoftLpfHz" class="rate-tpa_input" step="1" min="0"
                                    max="200" /> Hz
                                <div class="helpicon cf_tip" data-i18n_title="accLpfCutoffFrequencyHelp"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="acc_lpf_type"></th>
                            <td>
                                <select data-setting="acc_lpf_type" />
                                <div class="helpicon cf_tip" data-i18n_title="acc_lpf_type_help"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="yawLpfCutoffFrequency"></th>
                            <td>
                                <input type="number" id="yawLpfHz" class="rate-tpa_input" step="1" min="0" max="200" />
                                Hz
                                <div class="helpicon cf_tip" data-i18n_title="yawLpfCutoffFrequencyHelp"></div>
                            </td>
                        </tr>

                    </tbody>
                </table>
            </div>
        </div>

        <div id="subtab-mechanics" class="subtab__content">
            <div class="clear-both"></div>
            <div class="tab_subtitle" data-i18n="iTermMechanics" style="margin-top: 1em;"></div>
            <div class="cf_column">
                <table class="settings-table settings-table--filtering">
                    <tbody>
                        <tr>
                            <th data-i18n="airmode_type"></th>
                            <td>
                                <select data-setting="airmode_type" />
                                <div class="helpicon cf_tip" data-i18n_title="airmode_type_help"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="airmode_throttle_threshold"></th>
                            <td>
                                <select data-setting="airmode_throttle_threshold" />
                                <div class="helpicon cf_tip" data-i18n_title="airmode_throttle_threshold_help"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="itermRelax"></th>
                            <td>
                                <select data-setting="mc_iterm_relax" />
                                <div class="helpicon cf_tip" data-i18n_title="itermRelaxHelp"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="itermRelaxCutoff"></th>
                            <td>
                                <input data-setting="mc_iterm_relax_cutoff" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" data-i18n_title="itermRelaxCutoffHelp"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="antigravityGain"></th>
                            <td>
                                <input class="rate-tpa_input" data-setting="antigravity_gain" />
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="antigravityAccelerator"></th>
                            <td>
                                <input class="rate-tpa_input" data-setting="antigravity_accelerator" />
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="antigravityCutoff"></th>
                            <td>
                                <input class="rate-tpa_input" data-setting="antigravity_cutoff_lpf_hz" />
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="itermBankAngleFreeze"></th>
                            <td>
                                <input class="rate-tpa_input" data-setting="fw_yaw_iterm_freeze_bank_angle" type="number" step="1" min="0" max="90" />
                                <div class="helpicon cf_tip" data-i18n_title="itermBankAngleFreezeHelp"></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="clear-both"></div>
            <div class="tab_subtitle" data-i18n="dTermMechanics" style="margin-top: 1em;"></div>
            <div class="cf_column">
                <table class="settings-table settings-table--filtering">
                    <tbody>
                        <tr>
                            <th data-i18n="d_boost_factor"></th>
                            <td>
                                <input data-setting="d_boost_factor" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" data-i18n_title="d_boost_factor_help"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="d_boost_max_at_acceleration"></th>
                            <td>
                                <input data-setting="d_boost_max_at_acceleration" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" data-i18n_title="d_boost_max_at_acceleration_help"></div>
                            </td>
                        </tr>
                        <tr>
                            <th data-i18n="d_boost_gyro_delta_lpf_hz"></th>
                            <td>
                                <input data-setting="d_boost_gyro_delta_lpf_hz" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" data-i18n_title="d_boost_gyro_delta_lpf_hz_help"></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="clear-both"></div>
            <div class="tab_subtitle" data-i18n="tpaMechanics" style="margin-top: 1em;"></div>
            <div class="cf_column" style="margin-top:1em;">
                <table class="settings-table settings-table--misc">
                    <tr>
                        <th data-i18n="pidTuningTPA"></th>
                        <td>
                            <input type="number" class="rate-tpa_input" id="tpa" step="1" min="0" max="100" />
                            %
                            <div class="helpicon cf_tip" data-i18n_title="pidTuningTPAHelp"></div>
                        </td>
                    </tr>
                    <tr>
                        <th data-i18n="pidTuningTPABreakPoint"></th>
                        <td>
                            <input type="number" class="rate-tpa_input" id="tpa-breakpoint" step="10" min="1000"
                                max="2000" />
                            <div class="helpicon cf_tip" data-i18n_title="pidTuningTPABreakPointHelp"></div>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="clear-both"></div>
            <div class="tab_subtitle" data-i18n="fwLevelTrimMechanics" style="margin-top: 1em;"></div>
            <div class="cf_column">
                <table class="settings-table settings-table--filtering">
                    <tbody>
                        <tr>
                            <th data-i18n="fw_level_pitch_trim"></th>
                            <td>
                                <input data-setting="fw_level_pitch_trim" class="rate-tpa_input" />
                                <div class="helpicon cf_tip" data-i18n_title="fw_level_pitch_trim_help"></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="clear-both"></div>
    <div class="content_toolbar">
        <div class="btn save_btn">
            <a class="update" href="#" data-i18n="pidTuningButtonSave"></a>
        </div>
        <div class="btn refresh_btn">
            <a class="refresh" href="#" data-i18n="pidTuningButtonRefresh"></a>
        </div>
    </div>
</div>